package leetcode_2301_2400;

import java.util.HashSet;
import java.util.Set;

public class LeeCode_2351 {
    public static void main(String[] args) {

    }
    private static char repeatedCharacter(String s) {
        Set<Character> set = new HashSet<>();
        for (int i = 0; i < s.length(); i++) {
            if (set.contains(s.charAt(i))){
                return s.charAt(i);
            }else {
                set.add(s.charAt(i));
            }
        }
        return '0';
    }
}
